/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "pyfntbproindic")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pyfntbproindic.findAll", query = "SELECT p FROM Pyfntbproindic p"),
    @NamedQuery(name = "Pyfntbproindic.findByPyfntbproindicid", query = "SELECT p FROM Pyfntbproindic p WHERE p.pyfntbproindicid = :pyfntbproindicid")})
public class Pyfntbproindic implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pyfntbproindicid")
    private Integer pyfntbproindicid;
    @JoinColumn(name = "pyfntbpoaprogid", referencedColumnName = "pyfntbpoaprogid")
    @ManyToOne(optional = false)
    private Pyfntbpoaprog pyfntbpoaprogid;
    @JoinColumn(name = "pyfntbindicgesid", referencedColumnName = "pyfntbindicgesid")
    @ManyToOne(optional = false)
    private Pyfntbindicges pyfntbindicgesid;

    public Pyfntbproindic() {
    }

    public Pyfntbproindic(Integer pyfntbproindicid) {
        this.pyfntbproindicid = pyfntbproindicid;
    }

    public Integer getPyfntbproindicid() {
        return pyfntbproindicid;
    }

    public void setPyfntbproindicid(Integer pyfntbproindicid) {
        this.pyfntbproindicid = pyfntbproindicid;
    }

    public Pyfntbpoaprog getPyfntbpoaprogid() {
        return pyfntbpoaprogid;
    }

    public void setPyfntbpoaprogid(Pyfntbpoaprog pyfntbpoaprogid) {
        this.pyfntbpoaprogid = pyfntbpoaprogid;
    }

    public Pyfntbindicges getPyfntbindicgesid() {
        return pyfntbindicgesid;
    }

    public void setPyfntbindicgesid(Pyfntbindicges pyfntbindicgesid) {
        this.pyfntbindicgesid = pyfntbindicgesid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pyfntbproindicid != null ? pyfntbproindicid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pyfntbproindic)) {
            return false;
        }
        Pyfntbproindic other = (Pyfntbproindic) object;
        if ((this.pyfntbproindicid == null && other.pyfntbproindicid != null) || (this.pyfntbproindicid != null && !this.pyfntbproindicid.equals(other.pyfntbproindicid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Pyfntbproindic[ pyfntbproindicid=" + pyfntbproindicid + " ]";
    }
    
}
